<div class="ivu-form ivu-form-label-right">
    <!--脚本将会混入表单自定义表单控件-->
    <script>
        window.custFormComponentMixin ={
            data: function () {
                return {"test":"helloWorld"};
            },
            created:function(){
                console.log("混入对象的钩子被调用");
            },methods:{
                testaaa:function(){alert(1)},
                custValid:function(){
                    // 执行业务校验，return false则终止提交
                    return true;
                }
            }
        }
    </script>
    <#list model.calGroups() as group>
        <#if group.calGroupType()=="fz">
            <!-- 主表 -->
            <div class="panel panel-default">
                <div class="panel-heading">${group.calTitle()}</div>
                <div class="panel-body">
                    <#list group.groupColumn as column>
                        <#if column.calIsShowColumn()>
                            <div class="col-xs-${column.calSpan12()} form-item" v-ab-permission:show="${parser.getColumnPermissionPath(column)}">
                                <label class="form-item-label">${column.label}</label>
                                <div class="form-item-content">${parser.getColumn(column)}</div>
                            </div>
                        </#if>
                    </#list>
                </div>
            </div>
        </#if>
        <#if group.calGroupType()=="kzb">
            <!-- 块子表 -->
            <div ${parser.getSubAttrs(group)} >
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <span class="title">${group.label}</span>
                        <ab-sub-add href="javascript:void(0)" class="btn btn-primary btn-sm fa fa-plus" v-model="${parser.getTableVModlePath(group)}" v-bind:init-data="initData.${parser.calBoKey()}.${group.calTableName()}" v-ab-permission:edit="${parser.getTablePermissionPath(group)}">添加 </ab-sub-add>
                        <ab-sub-imp href="javascript:void(0)" class="btn btn-primary btn-sm fa fa-download" v-model="${parser.getTableVModlePath(group)}" table-key="${group.calTableName()}" v-ab-permission:edit="${parser.getTablePermissionPath(group)}">导入 </ab-sub-imp>
                        <ab-sub-exp href="javascript:void(0)" class="btn btn-primary btn-sm fa fa-upload" v-model="${parser.getTableVModlePath(group)}" table-key="${group.calTableName()}" v-ab-permission:edit="${parser.getTablePermissionPath(group)}">导出 </ab-sub-exp>
                    </div>
                    <ab-sub-scope v-slot="scope" :permissiona="permission" :table-permissiona="tablePermission" v-for="(${group.calTableName()},index) in ${parser.getTableVModlePath(group)}">
                        <div class="col-xs-12 panel-heading">
                            <ab-sub-del class="btn btn-danger btn-sm fa fa-delete" v-model="${parser.getTableVModlePath(group)}" v-bind:index="index" v-ab-permission:edit="scope.tablePermission.${parser.calBoKey()}.${group.calTableName()}">移除</ab-sub-del>
                        </div>
                        <div class="panel-body">
                            <#list group.groupColumn as groupColumn>
                                <#if groupColumn.calIsShowColumn()>
                                    <div class="col-xs-${groupColumn.calSpan12()} form-item" v-ab-permission:show="${parser.getColumnPermissionPath(groupColumn)}">
                                        <label class="form-item-label">${groupColumn.label}</label>
                                        <div class="form-item-content">${parser.getColumn(groupColumn)}</div>
                                    </div>
                                </#if>
                            </#list>
                        </div>
                    </ab-sub-scope>
                </div>
            </div>
        </#if>
        <#if group.calGroupType()=="hzb">
            <!-- 行子表 -->
            <div ${parser.getSubAttrs(group)}>
                <div class="ibox-title">
                    <span class="title">${group.label}</span>
                    <ab-sub-add href="javascript:void(0)" class="btn btn-primary btn-sm fa fa-plus" v-model="${parser.getTableVModlePath(group)}" v-bind:init-data="initData.${parser.calBoKey()}.${group.calTableName()}" v-ab-permission:edit="${parser.getTablePermissionPath(group)}">添加 </ab-sub-add>
                    <ab-sub-imp href="javascript:void(0)" class="btn btn-primary btn-sm fa fa-download" v-model="${parser.getTableVModlePath(group)}" table-key="${group.calTableName()}" v-ab-permission:edit="${parser.getTablePermissionPath(group)}">导入 </ab-sub-imp>
                    <ab-sub-exp href="javascript:void(0)" class="btn btn-primary btn-sm fa fa-upload" v-model="${parser.getTableVModlePath(group)}" table-key="${group.calTableName()}" v-ab-permission:edit="${parser.getTablePermissionPath(group)}">导出 </ab-sub-exp>
                </div>
                <div class="ibox-content">
                    <table class="form-table">
                        <thead>
                        <tr>
                            <#list group.groupColumn as groupColumn>
                                <#if groupColumn.calIsShowColumn()>
                                    <th>${groupColumn.label}</th>
                                </#if>
                            </#list>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <ab-sub-scope-tr v-slot="scope" :permissiona="permission" :table-permissiona="tablePermission" v-for="(${group.calTableName()},index) in ${parser.getTableVModlePath(group)}">
                            <#list group.groupColumn as groupColumn>
                                <#if groupColumn.calIsShowColumn()>
                                    <td>${parser.getColumn(groupColumn)}</td>
                                </#if>
                            </#list>
                            <td>
                                <ab-sub-del class="btn btn-danger btn-sm fa fa-delete" v-model="${parser.getTableVModlePath(group)}" v-bind:index="index" v-ab-permission:edit="scope.tablePermission.${parser.calBoKey()}.${group.calTableName()}">移除</ab-sub-del>
                            </td>
                        </ab-sub-scope-tr>
                    </table>
                </div>
            </div>
        </#if>
    </#list>
</div>
